CC = gcc
CFLAGS = -O0

gcd: gcd.c
	$(CC) $(CFLAGS) -o $@ $^

factorial: factorial.c
	$(CC) $(CFLAGS) -o $@ $^

eval: eval.c
	$(CC) $(CFLAGS) -o $@ $^

linkedlist: linkedlist.c
	$(CC) $(CFLAGS) -o $@ $^

maximum: maximum.c
	$(CC) $(CFLAGS) -o $@ $^

hanoi: hanoi.c
	$(CC) $(CFLAGS) -o $@ $^

rule: rule.c
	$(CC) $(CFLAGS) -o $@ $^

binary_table: binary_table.c
	$(CC) $(CFLAGS) -o $@ $^

fibonacci: fibonacci.c
	$(CC) $(CFLAGS) -o $@ $^

knapsack_dp: knapsack_dp.c
	$(CC) $(CFLAGS) -o $@ $^

bt_trav_r: bt_trav_r.c
	$(CC) $(CFLAGS) -o $@ $^

bt_trav_i: bt_trav_i.c ListStack.c ListQUEUE.c
	$(CC) $(CFLAGS) -o $@ $^

binary_tree: binary_tree.c
	$(CC) $(CFLAGS) -o $@ $^

tournament: tournament.c
	$(CC) $(CFLAGS) -o $@ $^

parse_tree: parse_tree.c
	$(CC) $(CFLAGS) -o $@ $^

clean:
	rm -f avg gcd factorial eval linkedlist maximum hanoi rule binary_table fibonacci\
	knapsack_dp bt_trav_r bt_trav_i binary_tree tournament\
	parse_tree